export default {
	onShow(){
		console.log('mixnix show')
	},
	methods:{
		sendToServerOnShow(title,pictrue){
			let whitePages = [
				{
					type:1,
					// 1:首页, 2:产品, 3:案例, 4:基地, 5:讲师, 6:供应商, 7:产品列表
					path:'/pages/index/index'
				},{
					type:2,
					path:'pages/product/detail',
				},{
					type:3,
					path:'pages/sample/detail',
				},{
					type:4,
					path:'pages/resource/base/detail'
				},{
					type:5,
					path:'pages/resource/teacher/detail'
				},{
					type:6,
					path:'pages/resource/supplier/detail'
				},{
					type:7,
					path:'/pages/product/index'
				}];
			    let index = whitePages.findIndex((el) => this.currentPath.indexOf(el.path) > -1);
				this.pageType = whitePages[index].type;
				const data = {
					type: this.pageType,
					title: title,
					picture: pictrue,
					path: this.currentPath
				}
				this.$http.post('/api/member/business/browse/start', data).then((res) => {
					
				})
		}
	},
	onHide(){
		const data = {
			type: this.pageType,
			path: this.currentPath
		}
		this.$http.post('/api/member/business/browse/end',data)
	},
	onUnload(){//销毁时
		const data = {
			type: this.pageType,
			path: this.currentPath
		}
		this.$http.post('/api/member/business/browse/end',data)
	}
}